<?php

defined('SYSPATH') or die('Access error!');
/**
 * 收藏相关的类
 * ============================================================================
 * 功能描述： 
 *      收藏：产品，文章，店铺，etc.
 * ============================================================================
 * $Author: liuxudong $
 */

class Controller_User_Collect extends Controller_User_Main
{

    private $collect;

    public function before()
    {
        parent::before();
        $this->collect = Model::factory('collect');
    }

    
    public function action_list()
    {
        $type = $this->request->param('id');
        //设置当前位置
        $this->set_define_position(__('my collect'),URL::site('user/collect/list'));
        $data = array();
        if (!empty($type))
        {
             $data['type'] = $type;
            Breadcrumbs::add(__($type.' collect'));
        }
        $data['user_id'] = $this->user_detail['id'];
        $collect_list = $this->collect->get_collect_list($data);
        $this->template->assign('collect_list', $collect_list['list']);
        $this->template->assign('page', $collect_list['page']);
        $this->template->view('user_collect_list');
    }

    

}